{% extends "base.html" %}
{% block content %}
<div class="container mt-4">
    <h2 class="mb-4">创建新歌单</h2>
    <div class="card shadow">
        <div class="card-body">
            <form method="POST" novalidate>
                {{ form.hidden_tag() }}

                <div class="form-group">
                    {{ form.name.label(class="form-control-label font-weight-bold") }}
                    {{ form.name(class="form-control form-control-lg" + (' is-invalid' if form.name.errors else '')) }}

                    {% for error in form.name.errors %}
                    <div class="invalid-feedback">
                        {{ error }}
                    </div>
                    {% endfor %}
                </div>

                <div class="mt-4">
                    {{ form.submit(class="btn btn-primary btn-lg px-5") }}
                    <a href="{{ url_for('index') }}" class="btn btn-secondary btn-lg px-5 ml-2">取消</a>
                </div>
            </form>
        </div>
    </div>
</div>
{% endblock %}